<template>
	<view class="content">
		<!-- 核酸预约记录ncReserveRec -->
		<!-- <view class="person" v-for="item in personList" :key="item.id">
			<view class="left">
				<view class="data">
					<view class="name">{{ item.name }}</view>
					<view class="tip">本人</view>
				</view>
				<text class="idcard">{{ item.idcard }}</text>
			</view>
			<view class="right">
				<text class="iconfont icon-qiehuan"></text>
				<text class="identfy">切换就诊人</text>
			</view>
		</view> -->
		<SwitchPatient :fun="swit" balance></SwitchPatient>
		<view class="time">
			<view class="time-left"><text>近一年</text></view>
			<view class="time-right">
				<picker
					mode="date"
					value="{{date}}"
					start="2015-09-01"
					end="2017-09-01"
					bindchange="bindDateChange"
				>
					<view class="picker"><text>选择时间 ▼</text></view>
				</picker>
			</view>
		</view>
		<view class="card" v-for="item in detailList" :key="item.id">
			<view class="name">
				<text class="item">{{ item.item }}</text>
				<text class="status">{{ item.status }}</text>
			</view>
			<view class="detail">
				<view class="nape">
					<text class="item">就诊科室</text>
					<text class="thing">{{ item.personk }}</text>
				</view>
				<view class="nape">
					<text class="item">就诊时间</text>
					<text class="thing">{{ item.time }}</text>
				</view>
				<view class="nape">
					<text class="item">就诊人</text>
					<text class="thing">{{ item.person }}</text>
				</view>
				<view class="name">
					<view class="btn">
						<text></text>
						<navigator url="/pages/allRecord/ncReport/ncReport"><button v-if="item.status == '已完成'">查看报告</button></navigator>
						
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import SwitchPatient from '@/components/SwitchPatient.vue'
import { reactive } from 'vue'
let personList = reactive([{ id: 1, name: '', idcard: '24835523433' }])
let detailList = reactive([
	{
		id: 1,
		item: '新型冠状病毒核酸检测（咽拭子）',
		status: '预约成功',
		personk: '保健科',
		time: '2020/12/03',
		person: '王敏'
	},
	{
		id: 2,
		item: '新型冠状病毒核酸检测（咽拭子）',
		status: '已完成',
		personk: '保健科',
		time: '2020/12/03',
		person: '王敏'
	}
])
</script>

<style lang="less">
.content {
	margin: 40rpx 30rpx;
	.card {
		border: 1px solid #f6f6f6;
		padding: 0 30rpx;
		.name {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 100rpx;
			.btn {
				display: flex;
				justify-content: space-between;
				button {
					width: 160rpx;
					height: 60rpx;
					line-height: 60rpx;
					font-size: 25rpx;
					color: #ffffff;
					background-color: #006eff;
				}
			}
			.item {
				font-size: 30rpx;
			}
			.status {
				font-size: 25rpx;
				color: #006eff;
			}
		}
		.detail {
			border-top: 1px solid #f6f6f6;
			height: 230rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-evenly;
			.nape {
				.item {
					font-size: 25rpx;
					color: #afafaf;
					margin-right: 20rpx;
				}
				.thing {
					font-size: 26rpx;
				}
			}
		}
	}
	.time {
		display: flex;
		margin-bottom: 30rpx;
		.time-left {
			background-color: #006eff;
			width: 130rpx;
			height: 50rpx;
			line-height: 50rpx;
			color: #ffffff;
			font-size: 25rpx;
			text-align: center;
			border-radius: 50rpx;
		}
		.time-right {
			margin: 0 40rpx;
			background-color: #e4f0ff;
			width: 180rpx;
			height: 50rpx;
			line-height: 50rpx;
			color: #006eff;
			font-size: 25rpx;
			text-align: center;
			border-radius: 50rpx;
		}
	}
	.person {
		margin: 30rpx 0;
		padding: 0 30rpx;
		background-color: #f5f9ff;
		border: 1px solid #f5f5f6;
		border-radius: 10rpx;
		height: 200rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;

		.left {
			display: flex;
			flex-direction: column;
			.data {
				display: flex;
				.name {
					font-size: 30rpx;
					margin-right: 30rpx;
				}
				.tip {
					width: 80rpx;
					height: 40rpx;
					text-align: center;
					line-height: 40rpx;
					font-size: 25rpx;
					background-color: #e2edfe;
					color: #66bdfe;
					border-radius: 30rpx;
				}
			}
			.idcard {
				margin-top: 20rpx;
				color: #bdc7d3;
				font-size: 28rpx;
			}
		}
		.right {
			font-size: 25rpx;
			color: #909495;
			display: flex;
			flex-direction: column;
			align-items: center;

			.icon-qiehuan {
				color: #006eff;
				font-size: 48rpx;
			}
		}
	}
}
</style>
